import 'package:cbec_app/components/base/base_image.dart';
import 'package:cbec_app/components/common/common_style.dart';
import 'package:cbec_app/utils/Tools.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class PromotionsOrderItem extends StatelessWidget {
  const PromotionsOrderItem({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 10.w),
      padding: EdgeInsets.all(10.w),
      decoration: border_radis(Colors.white),
      child: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Row(
                children: [
                  Text("订单编号:",style: TextStyle(fontSize: 13,color: Tools.fromHex("#999999"))),
                  Text("32454643233564",style: TextStyle(fontSize: 13)),
                ],
              ),
              Text("待发货",style: TextStyle(fontSize: 13,color: Tools.fromHex("#F83F2D")))
            ],
          ),
          //商品列表
          Container(
            margin: EdgeInsets.only(top: 10.w, bottom: 10.w),
            child: Row(
              children: [
                BaseImage(
                    url:
                        "https://gw.alicdn.com/imgextra/i4/2466245383/O1CN01aqozgu1pdSqPL7rQD_!!2466245383.png_.webp",
                    width: 58,
                    height: 58),
                SizedBox(
                  width: 10.w,
                ),
                Column(
                  children: [
                    Container(
                      width: 240.w,
                      child: Text(
                        "雅集直觉杯男士玻璃杯耐热玻璃泡茶杯办公室家用茶水分离带过滤水杯",
                        style: TextStyle(fontSize: 14,fontWeight: FontWeight.w400),
                        overflow: TextOverflow.ellipsis,
                      ),
                    ),
                    SizedBox(
                      height: 10.w,
                    ),
                    Container(
                      width: 240.w,
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text("￥766",style: TextStyle(fontSize: 14,fontWeight: FontWeight.w400)), 
                          Text("x1",style: TextStyle(fontSize: 14,color: Tools.fromHex("#999999")))],
                      ),
                    )
                  ],
                )
              ],
            ),
          ),

          //最下面
          Container(
            child: Row(
              children: [
                BaseImage(
                    url:
                        "https://q9.itc.cn/q_70/images03/20240312/5c2f7c3ad5eb4d2fb8fb5fe5ae92e245.jpeg",
                    width: 32,
                    height: 32,
                    borderRadius: BorderRadius.circular(16)),
                SizedBox(
                  width: 4,
                ),
                Text("李小白",
                    style: TextStyle(
                        fontSize: 12, color: Tools.fromHex("#999999"))),
                SizedBox(width: 10),
                Text("18215533693",
                    style: TextStyle(
                        fontSize: 12, color: Tools.fromHex("#999999"))),
                SizedBox(width: 35),
                Text("运费：￥5",
                    style: TextStyle(
                        fontSize: 12, color: Tools.fromHex("#999999"))),
                SizedBox(width: 10),
                Text("合计:",
                    style: TextStyle(
                        fontSize: 12,
                        color: Tools.fromHex("#F83F2D"),
                        fontWeight: FontWeight.bold)),
                Text("￥45",
                    style: TextStyle(
                        fontSize: 14,
                        color: Tools.fromHex("#F83F2D"),
                        fontWeight: FontWeight.bold))
              ],
            ),
          )
        ],
      ),
    );
  }
}
